import argparse
import train_cmd, predict_cmd


def main(args=None):
    parser = argparse.ArgumentParser(add_help=False)

    group = parser.add_mutually_exclusive_group(required=True)
    group.add_argument('--train', action='store_true')
    group.add_argument('--predict', action='store_true')

    namespace, args = parser.parse_known_args(args=args)
    if namespace.train:
        train_cmd.main(args)
    elif namespace.predict:
        predict_cmd.main(args)
    else:
        raise ValueError


if __name__ == '__main__':
    main()
